﻿using System;
using System.ComponentModel.DataAnnotations;

namespace si.caha.Model
{
    public class Address
    {
        [Key]
        public int AddressId { get; set; }

        [Required]
        [StringLength(100)]
        public string Firstname { get; set; }

        [Required]
        [StringLength(100)]
        public string Surname { get; set; }

        [Required]
        [StringLength(500)]
        public string StreetWithHouseNumber { get; set; }

        [Required]
        [StringLength(500)]
        public string Post { get; set; }

        [Required]
        [RangeAttribute(1000, 9600)] // Slovenian ZIP codes for now
        public int PostNumber { get; set; }

        [StringLength(500)]
        public string Country { get; set; }

        public int UserId { get; set; }
    }
}